﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Configuration;
using System.Web;
using System.IO;

namespace Core.DS
{
    public static partial class CourseDesign
    {
        public static dynamic deleteCd(int id)
        {
            var sql = new Sql.SqlDataContext();
            var s = sql.Subjects.Where(row => row.id == id);
            if (s == null)
                return new
                {
                    success = false,
                    msg = "找不到相应课题"
                };
            sql.Subjects.DeleteAllOnSubmit(s);
            sql.SubmitChanges();
            return new
            {
                success = true
            };
        }
    }
}
